package com.net.lnk.rpc.http.consumer.web;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.net.lnk.rpc.http.hello.IHello;
import com.net.lnk.rpc.http.hello.dto.HelloDTO;

@Component
public class HelloController {

	@Resource
	private IHello iHello;

	public void hello() {
		for (int i = 0; i < 10; i++) {
			System.out.println(iHello.hello());
		}
	}

	public void hello1() {
		for (int i = 0; i < 10; i++) {
			System.out.println(iHello.hello("Hello, World " + i));
		}
	}

	public void hello2() {
		for (int i = 0; i < 10; i++) {
			System.out.println(iHello.hello(new HelloDTO("Hello, World " + i)));
		}
	}

	public void helloWorld() {
		System.out.println(iHello.helloWorld().getMessage());
	}

}
